package com.labofjet.bean.impl;

import com.labofjet.bean.BaseEnum;

/**
 * 后台给前台返回的错误类型
 * @author jyzjyz12@163.com
 *
 */
public enum EState implements BaseEnum {
    SUCCESS("0", "成功"), BUSSINESS_EXCEPTION("1", "业务逻辑错误"), VALIDATION_EXCEPTION("2", "验证错误"), SYSTEM_EXCEPTION("99",
            "系统内部错误");

    private String code;
    private String text;

    EState(String code, String text) {
        this.code = code;
        this.text = text;
    }

    @Override
    public String getCode() {
        // TODO Auto-generated method stub
        return code;
    }

    @Override
    public String getText() {
        // TODO Auto-generated method stub
        return text;
    }

    @Override
    public String toString() {
        // TODO Auto-generated method stub
        return text;
    }
}
